// 出库相关API接口
import request from '../request'

export default {
  // 获取出库单列表
  getOutboundList(params) {
    return request.get('/outbound/list', params)
  },
  
  // 获取出库单详情
  getOutboundDetail(id) {
    return request.get(`/outbound/${id}`)
  },
  
  // 创建出库单
  createOutbound(data) {
    return request.post('/outbound/create', data)
  },
  
  // 更新出库单
  updateOutbound(id, data) {
    return request.put(`/outbound/${id}`, data)
  },
  
  // 删除出库单
  deleteOutbound(id) {
    return request.delete(`/outbound/${id}`)
  },
  
  // 确认出库
  confirmOutbound(id, data) {
    return request.post(`/outbound/${id}/confirm`, data)
  },
  
  // 取消出库
  cancelOutbound(id, reason) {
    return request.post(`/outbound/${id}/cancel`, { reason })
  },
  
  // 扫码出库
  scanOutbound(code, data) {
    return request.post('/outbound/scan', { code, ...data })
  },
  
  // 批量出库
  batchOutbound(data) {
    return request.post('/outbound/batch', data)
  },
  
  // 获取出库统计
  getOutboundStats(params) {
    return request.get('/outbound/stats', params)
  },
  
  // 获取出库类型
  getOutboundTypes() {
    return request.get('/outbound/types')
  },
  
  // 获取客户列表
  getCustomers(params) {
    return request.get('/outbound/customers', params)
  },
  
  // 获取出库单状态
  getOutboundStatus(id) {
    return request.get(`/outbound/${id}/status`)
  },
  
  // 打印出库单
  printOutbound(id) {
    return request.get(`/outbound/${id}/print`)
  },
  
  // 导出出库数据
  exportOutbound(params) {
    return request.get('/outbound/export', params)
  },
  
  // 获取出库历史
  getOutboundHistory(params) {
    return request.get('/outbound/history', params)
  },
  
  // 检查库存是否充足
  checkStock(data) {
    return request.post('/outbound/check-stock', data)
  },
  
  // 获取推荐出库位置
  getRecommendedLocation(data) {
    return request.post('/outbound/recommended-location', data)
  }
} 